#include "wizard.h"
#include "ui_wizard.h"
#include <QDebug>
#include <QWizardPage>

Wizard::Wizard(QWidget *parent) :
    QWizard(parent),
    ui(new Ui::Wizard)
{
    ui->setupUi(this);
}

void Wizard::done(int result)
{
    if(result == QDialog::Rejected)
    {
        qDebug() << "cancel ";
        // 必须执行QWizard::done(result) 这个结束函数
        // 否则Wizard的Page退不出去
        return QWizard::done(result);
    }
    QString name,path;
    ui->wizardPage1->GetProSettings(name,path);
    qDebug() << "done: " << "name "<< name << " path: " << path;
    emit SigSendMsg(name,path);
    QWizard::done(result);

}

Wizard::~Wizard()
{
    delete ui;
}
